Skip to content

fix(anthropic): stop inventing (latest) display-name suffix in sync - #6434

Open
bharadwaj-pendyala wants to merge 1 commit into
anomalyco:devfrom
bharadwaj-pendyala:fix/anthropic-latest-tag-logic
Open

bharadwaj-pendyala wants to merge 1 commit into
anomalyco:devfrom
bharadwaj-pendyala:fix/anthropic-latest-tag-logic

Conversation

@bharadwaj-pendyala

Copy link
Copy Markdown

Summary

Supersedes #6433 — root fix instead of data patch (close #6433 in favor of this).

buildAnthropicModel appended (latest) to every alias (canonical_id set). That was correct pre-4.6, but Anthropic froze old aliases and made 4.6+ dateless IDs pinned snapshots, so Opus 4/4.1/4.5 and Sonnet 4/4.5 kept a permanent (latest) tag while Opus 5 / Sonnet 5 got none. Same rot would repeat on every future release.

Changes

  • packages/core/src/sync/providers/anthropic.ts: use the API display_name verbatim, stripping any stale trailing (latest) — never invent the suffix. Matches all other providers, where a rolling -latest pointer is owned upstream.
  • packages/core/test/sync.test.ts: replaced labels Anthropic aliases as latest with never invents latest tags + strips stale latest suffix; updated inheritance mock name.
  • Swept six stale canonical names: Opus 4/4.1/4.5, Sonnet 4/4.5, Haiku 4.5.

Verification

  • TOML parses cleanly; zero remaining (latest) in models/anthropic/.
  • bun test / bun ./packages/core/script/validate.ts left to CI (no bun locally).
  • Current lineup cross-checked vs https://docs.anthropic.com/en/docs/about-claude/models (Opus 5 / Sonnet 5 / Haiku 4.5 current; Haiku tag removed too since the suffix concept is gone, users pick by version).

Anthropic retired the alias model after 4.6: dateless IDs are now pinned
snapshots, so every frozen pre-4.6 alias kept a permanent (latest) tag
(Opus 4/4.1/4.5, Sonnet 4/4.5) while newer pinned models got none.

Use the API display_name verbatim (stripping any stale suffix) instead of
appending (latest) to every alias. This matches all other providers, where
a rolling -latest pointer is owned upstream rather than hardcoded in names.

Also sweeps the six stale canonical names. Supersedes anomalyco#6433.
@github-actions

github-actions Bot commented Sep 6, 2026

Copy link
Copy Markdown
Contributor

No actionable findings.

@github-actions github-actions Bot added the reviewer: ready Automated review found no actionable items label Sep 6, 2026
@bharadwaj-pendyala

Copy link
Copy Markdown
Author

@rekram1-node this has been open since 6 September and it's still clean against dev. All six Anthropic names still carry (latest) there, and buildAnthropicModel still appends it, so each sync run puts it back.

@bharadwaj-pendyala

Copy link
Copy Markdown
Author

@rekram1-node dev's taken 1404 commits since I opened this 20 days ago and it still merges clean, both checks green. Worth a look when you're next in this area.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

reviewer: ready Automated review found no actionable items

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant